import datetime

sstr = '11 May, 2018'
print(datetime.datetime.strptime(sstr, "%d %b, %Y").strftime("%Y%m%d"))
